package com.msh.artascope.devcloud.client.enums.biz;

import com.msh.frame.client.define.StringDef;
import com.msh.frame.interfaces.ICodeDescEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ModuleRunningTypeEnum implements ICodeDescEnum {
  RELEASE("r", "正式"),
  GRAY("g", "灰度"),
  ;

  private final String code;
  private final String desc;

  public static String toDesc(String code) {
    for (ModuleRunningTypeEnum e : ModuleRunningTypeEnum.values()) {
      if (e.getCode().equals(code)) {
        return e.getDesc();
      }
    }
    return StringDef.EMPTY;
  }
}
